{{template "member/top.html" .}}

<div class="m-b-md"> <h3 class="m-b-none">{{msg . "Avatar"}}</h3></div>

<div class="row">

<div class="col-sm-8">
	<form id="uploadAvatar" method="post" action="/file/uploadAvatar" enctype="multipart/form-data">
		<section class="panel panel-default">
			<div class="panel-body">
				<div class="form-group">
	                <div id="dropAvatar" class="dropzone">
	                	<div>
							<img src="{{if .userInfo.Logo}}{{.userInfo.Logo}}{{else}}/images/blog/default_avatar.png{{end}}" id="avatar"/>
						</div>
	                    <a class="btn btn-success btn-choose-file">
							<span class="fa fa-upload"></span> {{msg . "chooseImage"}}
	                    </a>
	                    <input type="file" name="file" multiple/>
	                </div>
	                <div id="avatarUploadMsg">
	                </div>
				</div>
			</div>
		</section>
	</form>
</div>

</div>

{{template "member/footer.html" .}}
<script src="/js/require.js"></script>
<script>
var UrlPrefix = "{{.siteUrl}}"; // 为了发weibo
var GlobalConfigs = {{.globalConfigs|jsonJs}}; // 2014/11/9 beta2
require.config({
	baseUrl: '/public',
    paths: {
    	'avatar': 'member/js/avatar',
        'fileupload': 'js/plugins/libs-min/fileupload',
    }
});
$(function() {
	require(['avatar'], function(avatar) {});
});
</script>

{{template "member/end.html" .}}
